package cc.wsyw126.java;

import java.util.Scanner;

/**
 * Created by junpeng.yang on 17/2/23.
 */
public class testxmsx {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);    //Scanner类
        int i = in.nextInt();
        byte[] b = null;
        for (int j = 0; j < i; j++) {
            b = new byte[1 * 1024 * 1024];
        }

        System.out.println("Xmx=" + Runtime.getRuntime().maxMemory() / 1024.0 / 1024 + "M");     //系统的最大空间

        System.out.println("free mem=" + Runtime.getRuntime().freeMemory() / 1024.0 / 1024 + "M");   //系统的空闲空间

        System.out.println("total mem=" + Runtime.getRuntime().totalMemory() / 1024.0 / 1024 + "M");   //当前可用的总空间
    }
}
